home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 3 / Cream of the Crop 3.iso / utility / ffg155.zip / UTIL_BAT.ZIP / RECENT.BAT < prev    next >
DOS Batch File  |  1993-08-24  |  1KB  |  35 lines

  1. @echo off
  2. cls
  3. echo This is a listing of files created/modified in the last N minutes.
  4. echo Press any key to begin searching...
  5. pause>nul
  6. echo.
  7. echo.
  8. if %1.==. goto 1_OKAY
  9.   if not %1.==. for %%f in (A B C D E F G H I J K L M N O P Q R S T U V W X Y Z) do if %1==%%f: goto 1_OKAY
  10.   if not %1.==. for %%f in (a b c d e f g h i j k l m n o p q r s t u v w x y z) do if %1==%%f: goto 1_OKAY
  11.   if "%1"=="*:" goto 1_OKAY
  12.   if "%1"==":"  goto 1_OKAY
  13.   GOTO USAGE
  14. :1_OKAY
  15. if %2.==. GOTO LASTMINUTE
  16.   echo Searching for files created/modified in the last %2 minutes...
  17.   echo.
  18.   ffg /qmsf %1* /dt /p /t%2n-
  19.   goto END
  20. :LASTMINUTE
  21.   echo Searching for files created/modified in the last minute...
  22.   echo.
  23.   ffg /qmsf %1* /dt /p /t1n-
  24.   goto END
  25. :USAGE
  26.   echo USAGE: %0  [d: [m]]
  27.   echo.
  28.   echo    where d: is drive to search and 'm' is the number of minutes back in
  29.   echo    time.  If no drive is specified, the current drive is searched.  If
  30.   echo    if no 'm' is specified files dated later than one minute ago are found.
  31.   echo    To specify the 'm' you must explicity specify the drive.
  32. :END
  33. echo Done.  Press any key for next demonstration...
  34. pause>nul
  35.